package com.neu.cpspgateway.dao;

import com.neu.cpspgateway.pojo.Authority;
import com.neu.cpspgateway.pojo.AuthorityUser;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AuthorityMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Authority record);

    int insertSelective(Authority record);

    Authority selectByPrimaryKey(Integer id);

    Authority selectByUserId(Integer userid);

    int updateByPrimaryKeySelective(Authority record);

    List<Integer> selectUserIdBySubSystem(Integer subSystemId);

    Integer selectUserIdByNameAndSubSystem(String name,Integer subSystemId);

    int updateByPrimaryKey(Authority record);

    AuthorityUser selectAuthorityAndUserByUserId(Integer userId);

    int updateLookAuthorityByUserId(Integer userId, Boolean lookAuthority);

    int updateEditAuthorityByUserId(Integer userId, Boolean editAuthority);
}